home *** CD-ROM | disk | FTP | other *** search
/ Windows News 1997 February / Windows News CD #1 - Fev 97.iso / share / makehelp / exemple / vccp / exempvw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-22  |  2.4 KB  |  109 lines

  1. // exempvw.cpp : implementation of the CExempleView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "exemple.h"
  6.  
  7. #include "exempdoc.h"
  8. #include "exempvw.h"
  9.  
  10. #include "dial1.h"
  11. #include "dial2.h"
  12.  
  13. #ifdef _DEBUG
  14. #undef THIS_FILE
  15. static char BASED_CODE THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CExempleView
  20.  
  21. IMPLEMENT_DYNCREATE(CExempleView, CFormView)
  22.  
  23. BEGIN_MESSAGE_MAP(CExempleView, CFormView)
  24.     //{{AFX_MSG_MAP(CExempleView)
  25.     ON_COMMAND(ID_EXEMPLE_DIALOGUE1, OnExempleDialogue1)
  26.     ON_COMMAND(ID_EXEMPLE_DIALOGUE2, OnExempleDialogue2)
  27.     ON_BN_CLICKED(IDC_BPDIAL1, OnBpdial1)
  28.     ON_BN_CLICKED(IDC_BPDIAL2, OnBpdial2)
  29.     //}}AFX_MSG_MAP
  30. END_MESSAGE_MAP()
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CExempleView construction/destruction
  34.  
  35. CExempleView::CExempleView()
  36.     : CFormView(CExempleView::IDD)
  37. {
  38.     //{{AFX_DATA_INIT(CExempleView)
  39.         // NOTE: the ClassWizard will add member initialization here
  40.     //}}AFX_DATA_INIT
  41.     // TODO: add construction code here
  42. }
  43.  
  44. CExempleView::~CExempleView()
  45. {
  46. }
  47.  
  48. void CExempleView::DoDataExchange(CDataExchange* pDX)
  49. {
  50.     CFormView::DoDataExchange(pDX);
  51.     //{{AFX_DATA_MAP(CExempleView)
  52.         // NOTE: the ClassWizard will add DDX and DDV calls here
  53.     //}}AFX_DATA_MAP
  54. }
  55.  
  56. /////////////////////////////////////////////////////////////////////////////
  57. // CExempleView diagnostics
  58.  
  59. #ifdef _DEBUG
  60. void CExempleView::AssertValid() const
  61. {
  62.     CFormView::AssertValid();
  63. }
  64.  
  65. void CExempleView::Dump(CDumpContext& dc) const
  66. {
  67.     CFormView::Dump(dc);
  68. }
  69.  
  70. CExempleDoc* CExempleView::GetDocument() // non-debug version is inline
  71. {
  72.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExempleDoc)));
  73.     return (CExempleDoc*)m_pDocument;
  74. }
  75. #endif //_DEBUG
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CExempleView message handlers
  79.  
  80. void CExempleView::OnExempleDialogue1()
  81. {
  82.     // TODO: Add your command handler code here
  83.     CDial1    dial(this);
  84.     dial.DoModal();
  85.     
  86. }
  87.  
  88. void CExempleView::OnExempleDialogue2()
  89. {
  90.     // TODO: Add your command handler code here
  91.     CDial2    dial(this);
  92.     dial.DoModal();
  93.     
  94. }
  95.  
  96. void CExempleView::OnBpdial1()
  97. {
  98.     // TODO: Add your control notification handler code here
  99.     OnExempleDialogue1();
  100.     
  101. }
  102.  
  103. void CExempleView::OnBpdial2()
  104. {
  105.     // TODO: Add your control notification handler code here
  106.     OnExempleDialogue2();
  107.     
  108. }
  109.